home *** CD-ROM | disk | FTP | other *** search
- From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
- Date: Mon, 6 Sep 93 10:47:14 +0200
- Message-Id: <9309060847.AA20734@issan.informatik.uni-dortmund.de>
- To: mint@atari.archive.umich.edu
- Subject: More bugs in MiNT 1.09
-
- zero() can produce an address error on an 68000 when the size of the
- block is uneven.
-
- load_region() can pass a non-word-aligned block to zero().
-
- --- orig/mem.c Tue Aug 17 21:23:24 1993
- +++ mem.c Sat Sep 4 22:56:22 1993
- @@ -1145,7 +1145,18 @@
- size = b->p_blen;
- else
- size = b->p_hitpa - b->p_bbase;
- - zero((char *)b->p_bbase, size);
- + if (size > 0)
- + {
- + /* the block passed to zero() must be word-aligned! */
- + start = b->p_bbase;
- + if (start & 1)
- + {
- + *(char *) start = 0;
- + start++;
- + size--;
- + }
- + zero((char *)start, size);
- + }
-
- do_close(f);
- *text = shtext;
- --- orig/util.c Tue Aug 17 21:23:28 1993
- +++ util.c Sat Sep 4 22:40:34 1993
- @@ -81,13 +81,14 @@
-
- cruft = size % 256; /* quickzero does 256 byte blocks */
- size = size / 256;
- + if (size > 0) {
- + quickzero(place, size);
- + place += size * 256;
- + }
- while (cruft > 0) {
- *place++ = 0;
- cruft--;
- }
- - if (size > 0) {
- - quickzero(place, size);
- - }
- }
-
- #ifdef JUNK_MEM
-